<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

    'hello/[:name]' => ['index/index/hello',['method'=>'get','ext'=>'html']],
    //除去域名计算: hello开头 并且传参(参数名为name[可有可无]hello/:name为必须有),则交给index/index/hello处理,条件为 要为get传值且尾名为html
    //eg: http://my.tp5.com/hello/zxy.html
    
    'today/[:year]/[:month]' => ['index/index/today',['method'=>'get'],['year'=>'\d{4}','month'=>'\d{2}']],
    //eg:   http://my.tp5.com/today/2017/10.html
];
